package org.fle4y.common.utils.log;

import java.io.File;
import java.util.logging.Logger;

/**
 * author : xiehui<br>
 * company : northking <br>
 * Create at: 2012-6-8<br>
 * @version : 1.0<br>
 * mailto:flexie@foxmail.com<br>
 *  Description : 用来记录日志
 *  Logger log= LogUtil.getLogger("xxxx");
 */
public class LogUtil {
	/**
	 * 设置自定义的日志文件的位置,默认情况下是jre\lib\logging.properties
	 * 我们通过设置系统属性来改变它
	 * */
	static{
		try {
			File file = new File("conf/logging.properties");
			System.setProperty("java.util.logging.config.file",file.getAbsolutePath());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public static Logger getLogger(String name){
		return MyLogger.getLogger(name);
	}
}
